package utils;

import java.util.*;

/**
 * User: yeh
 * Date: 2/7/13
 * Time: 10:36 PM
 * For:  wilddragon
 */
public class AniMapBuilder<K, V> {
    private Map<K, V> resultMap;

    public AniMapBuilder(){
        this.resultMap = new HashMap<K, V>();
    }

    public AniMapBuilder<K, V> put(K key, V value){
        if(value != null
                && !value.equals(0L) && !value.equals(0)){
            this.resultMap.put(key,  value);
        }
        return this;
    }

    public AniMapBuilder<K, V> putAnyway(K key, V value){
        this.resultMap.put(key,  value);
        return this;
    }

    public Map<K, V> getMap(){
        return resultMap;
    }
}
